package com.wallet.my.service;

import com.wallet.my.contract.Web3jContract.PaiMai;
import com.wallet.my.controller.model.TransContractRequest;
import com.wallet.my.dao.pojo.ContractDO;
import com.wallet.my.dao.pojo.ContractRecordDO;

import java.util.List;
import java.util.Map;

/**
 * 合约service接口
 **/
public interface ContractService {
//    查询所有拍卖合约列表
    public List<ContractDO> getPaiMaiContracts();

//    部署智能合约
    public Map<String, Object> newPaiMaiContract(TransContractRequest transContractRequest);

//    调用合约出价
    public Map<String, Object> paiMaiBid(TransContractRequest transContractRequest);

//    根据合约地址从库里查询出价明细
    public List<ContractRecordDO> getContractRecordByContractAddress(String contractAddress);

    // 查询当前拍卖交易明细
    public List<PaiMai.HighestBidIncreasedEventResponse> infoPaiMaiContract(String contractAddress);

    // 查询当前拍卖赢家
    public List<PaiMai.AuctionEndedEventResponse> endPaiMaiContract(String contractAddress);

    // 查询拍卖结束时间
    public Map<String, Object> paiMaiEndTime(String contractAddress);

    // 查询拍卖受益人
    public Map<String, Object> paiMaiBeneficiary(String contractAddress);

    // 查询拍卖当前最高出价人和价格
    public Map<String, Object> paiMaiHighest(String contractAddress);

//    当出价被超过时，赎回出价
    public Map<String, Object> paiMaiWithdraw(String privateKey,String contractAddress);

//    拍卖结束，卖家提款
    public Map<String, Object> paiMaiAuctionClose(String privateKey,String contractAddress);





}
